<template>
    
      <tr>
          <th>
            <input type="checkbox" v-model="checked" @change="lll($event,id)"/> <span></span>
          </th>
          <th>{{name}}</th>
          <th>{{price}}</th>
          <th>
            <button @click="sub">-</button>
            {{num}}
            <button @click="add">+</button>

            </th>
          <th>{{Dprice}}</th>
          <th>
            <button @click="del">删除</button>
          </th>
        </tr>
    
</template>

<script>
export default {
    props: ["name","price","num","Dprice","index","checked","id"],
    data() {
        return {
          
        };
    },
    computed: {

    },
    created() {

    },
    mounted() {

    },
    watch: {

    },
    methods: {
      sub(){
        this.$emit("sub",-1,this.index)
      },
      add(){
        this.$emit("add",+1,this.index)
      },
      del(){
        this.$emit("del1",this.index)
      },
      lll(e,id){
        this.$emit("lll",e.target.checked,id)
      }
    },
    components: {

    },
};
</script>

<style scoped >
  tr{
    text-align: left;
  }
</style>
